package com.hl.wechat.demo.utils;


import com.hl.wechat.demo.entity.ApiResult;
import com.hl.wechat.demo.enums.ResponseCodeEnums;

public class ApiResultUtils {
    public static  <T> ApiResult<T> success(T data){
        return new ApiResult<T>("OK",data,ResponseCodeEnums.OK.getCode());
    }
    public static   ApiResult<String> fail(ResponseCodeEnums enums, String msg){
        return new ApiResult<String>(msg,"",enums.getCode());
    }
}
